package com.music.constant;


import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @ClassName:   SmsProperties
 * @Author:      Li ZhenYong
 * @description:  初始化短信发送配置
 * @Date:        2022-04-06 19:53
 * @Version:  1.0
 */
@Component
public class SmsProperties implements InitializingBean {

	@Value("${sms.privateKey}")
	String privateKey;

	@Value("${sms.publicKey}")
	String publicKey;

	//  定义公开的静态常量进行接收
	public static String PRIVATE_KEY;

	public static String PUBLIC_KEY;

	@Override
	public void afterPropertiesSet() throws Exception {
		PRIVATE_KEY = privateKey;
		PUBLIC_KEY  = publicKey;
	}
}
